<template>
  <div class="wrapper">
    <!-- 使用组件 -->
    <child :account="username" class="children" id="first" @暴击="handler">
        <template #title>
            从父组件分发到子组件的内容
        </template>
    </child>
  </div>
</template>

<script>
// 导入组件
import Child from './Child.vue';

export default {
  name: 'Father',
  data(){
    return {
      username: 'sanfeng'
    }
  },
  methods: {
    handler(value){
        console.log( value );
    } 
  },
  // 注册组件(局部注册)
  components: { Child }
}
</script>

<style scoped>
.wrapper {
    margin: 15px;
    border: 1px solid #dedede;
    box-shadow: 0 0 20px -10px blue;
}
</style>